<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;
%>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn"><head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>意见反馈</title>
    <script src="/static/login/js/simpleAlert.js"></script>

    <link rel="stylesheet" href="http://localhost:8080/static/login/css/simpleAlert.css">
    <style type="text/css">

        *{margin:0;padding:0;list-style:none;}

        img{border:none;}

        body{font-size:12px;font-family:"宋体",Arial,sans-serif;color:#000;}

        a{color:#333;text-decoration:none;}

        a:hover{text-decoration:underline;}

        .clear{clear:both;height:0;overflow:hidden;}

        table{border-collapse:collapse;}



        /*clearfix*/

        .clearfix:after{visibility:hidden;display:block;font-size:0;content:"";clear:both;height:0;}

        *.clearfix{zoom:1;}

        /*container*/

        .content{width:799px;border:1px solid #D5D1D2;background:url(/static/img/bg.gif) repeat-x left top #fff;margin:55px auto 0;font-size:14px;padding-bottom:25px;}

        .content h2{background:url(/static/img/t1.gif) repeat-x left top;height:80px;margin:0px 15px;}

        .content h2 img{margin-top:8px;}

        .content p span{color:#ff0000;font-family:Arial Black;}

        .content .tip{color:#686868;width:799px;text-align:center;padding-bottom:20px;}

        .content select,.content .txt,.content textarea{color:#000000;border:1px solid #9B9B9B;background-color:#fff;font-size:14px;font-family:"宋体";}

        .content select{vertical-align:middle;width:216px;height:22px;line-height:22px;}

        .content textarea{width:477px;height:182px;vertical-align:top;}

        .content .txt{width:477px;height:22px;line-height:22px;vertical-align:middle;}

        .content .dan{padding-left:100px;}

        .content .btn{width:88px;height:26px;border:1;margin:30px 0 0 245px;}

        .content .dan .mar{margin:15px 0;}

        .content label{vertical-align:middle;}



        .contenta{width:483px;border:1px solid #D5D1D2;background:url(bga.gif) repeat-x left top #fff;margin:0 auto ;font-size:14px;padding-bottom:40px;position:absolute;height:258px;top:50%;left:50%; position:absolute;margin:-149px -241px;}

        .contenta h2{text-align:center;border-bottom:1px solid #EAE8E9;margin:35px 50px 0;padding-bottom:5px;}

        .contenta .tip{color:#686868;width:483px;text-align:center;padding:50px 0 40px;font-size:18px;}

        .contenta .tipa{color:#686868;width:483px;text-align:center;padding:50px 0 60px;font-size:18px;}

        .contenta .btna{background:url(/static/img/wancheng.gif) no-repeat left top;width:88px;height:26px;border:0;margin:0 0 0 190px;}

        .close{position:absolute;top:10px;right:15px;}

        .content .code{width:100px}

        .content .checkcode{vertical-align:middle;cursor:pointer;}
    </style>
    <meta http-equiv="content-language" content="zh-cn">

    <script type="text/javascript">



        var clearflag=0;
        function setStyle(x)
        {
//document.getElementById(x).style.background="yellow";
            if (clearflag < 1){
                document.getElementById(x).value="";
                clearflag=1;
            }
        }
    </script>
</head>
<body>
<div class="content">
    <h2><img src="/static/img/logo.png" alt="塔大洗浴"><img src="/static/img/t.gif" alt="意见反馈"></h2>
    <p class="tip">您好，欢迎提出宝贵意见和建议！您留下的每句话都将被用来改善我们的服务。</p>
    <div class="dan">



            <p class="mar"><span>*</span>反馈内容：<textarea name="yourwords" id="yourwords"></textarea></p>
            <p><span>&nbsp;&nbsp;</span>联系方式：<input type="text" onfocus="setStyle(this.id)" name="contact" id="contact" class="txt" value="请留下您的姓名和联系方式，以便及时得到回复。"></p>

            <p><input type="submit" id="subbutton" class="btn" value="提交反馈"></p>


    </div>
</div>

<script type="text/javascript">

    $("#subbutton").click(function () {
       var youwords=$("#yourwords").val();
       var contact=$("#contact").val();
      alert(youwords+"111"+contact);

        $.ajax({
            type: "post",
            url: "http://localhost:8080/admin/messge",
            data: {"youwords":youwords, "contact":contact},
            dataType: "json",
            success: function(data,statusTxt,xhr){
                alert("进来1111");
                var dblChoseAlert = simpleAlert({
                    "content":"提交成功，感谢您的反馈!",
                    "buttons":{
                        "确定":function () {

                            dblChoseAlert.close();
                        }
                    }
                });


            },
            error:function(xhr,textStatus){
                var dblChoseAlert = simpleAlert({
                    "content":"提交成功，感谢您的反馈!",
                    "buttons":{
                        "确定":function () {

                            dblChoseAlert.close();
                        }
                    }
                });
                alert("22222");

                console.log('错误');
                console.log(xhr);
                console.log(textStatus);
            },
            complete:function(){
                console.log('结束');
            }
        });

    })

</script>
</body></html>